import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeContainer from '../components/tabbar/homecontainer.vue'
import MemberContainer from '../components/tabbar/membercontainer.vue'
import ShopCarContainer from '../components/tabbar/shopcarcontainer.vue'
import SearchContainer from '../components/tabbar/searchcontainer.vue'
import NewsList from '../components/home/newsList.vue'
import NewInfo from '../components/home/newsInfo.vue'
import PhotoList from '../components/photolists/photolist.vue'
import PhotoInfo from '../components/photolists/photoinfo.vue'
import GoodLsit from '../components/goodslist/goodslist.vue'
import GoodInfo from '../components/goodslist/goodsinfo.vue'
import GoodsDesc from '../components/goodslist/goodsdesc.vue'
import GoodsComment from '../components/goodslist/goodscomment.vue'
Vue.use(VueRouter)

var router = new VueRouter({
  routes: [{
    path: '/',
    redirect: '/home'
  },
  {
    path: '/home',
    component: HomeContainer
  },
  {
    path: '/member',
    component: MemberContainer
  },
  {
    path: '/shopcar',
    component: ShopCarContainer
  },
  {
    path: '/search',
    component: SearchContainer
  },
  {
    path: '/home/newsList',
    component: NewsList
  },
  {
    path: '/home/newsList/:id',
    component: NewInfo
  },
  {
    path: '/home/photolist',
    component: PhotoList
  },
  {
    path: '/home/photoinfo/:id',
    component: PhotoInfo
  },
  {
    path: '/home/goodslist',
    component: GoodLsit
  },
  {
    path: '/home/goodsinfo/:id',
    component: GoodInfo
  },
  {
    path: '/home/goodsdesc/:id',
    component: GoodsDesc,
    name: 'goodsdesc'
  },
  {
    path: '/home/goodsComment/:id',
    component: GoodsComment,
    name: 'goodsComment'
  }
  ],
  // 修改默认的高亮显示
  linkActiveClass: 'mui-active'

})

export default router
